package com.haiwee.springbootjdbctemplate.service.impl;

import com.haiwee.springbootjdbctemplate.dao.UserDao;
import com.haiwee.springbootjdbctemplate.pojo.User;
import com.haiwee.springbootjdbctemplate.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: lichufeng
 * @Date: 2018/12/17 13:27
 * @Description:
 */
@Service
public class UserServiceImpl implements UserService {


	@Autowired
	UserDao userDao;

	@Override
	public List<User> queryUsers() {
		return userDao.queryUsers();
	}

	@Override
	public User getUser(Long id) {
		return userDao.getUser(id);
	}

	@Override
	public int addUser(User user) {
		return userDao.addUser(user);
	}

	@Override
	public int delUser(Long id) {
		return userDao.delUser(id);
	}

	@Override
	public int editUser(User user,Long id) {
		return userDao.editUser(user,id);
	}
}
